﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VSSTQH
{
    public class ParaPort
    {

        #region Port Name
        /// <summary>
        /// PortName = "COM1"
        /// </summary>
        public string PortName
        {
            get { return VSSTQH.Properties.Settings.Default.PortName; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.PortName != value)
                {
                    VSSTQH.Properties.Settings.Default.PortName = value;
                }
            }
        }
        #endregion

        #region Port Name 2
        /// <summary>
        /// PortName = "COM2"
        /// </summary>
        public string PortName2
        {
            get { return VSSTQH.Properties.Settings.Default.PortName2; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.PortName2 != value)
                {
                    VSSTQH.Properties.Settings.Default.PortName2 = value;
                }
            }
        }
        #endregion
        //--------------------------------------------
        #region Baud Rate
        /// <summary>
        /// BaudRate = 2400
        /// </summary>
        public int BaudRate
        {
            get { return VSSTQH.Properties.Settings.Default.BaudRate; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.BaudRate != value)
                {
                    VSSTQH.Properties.Settings.Default.BaudRate = value;
                }
            }
        }
        #endregion

        #region Baud Rate 2
        /// <summary>
        /// BaudRate = 2400
        /// </summary>
        public int BaudRate2
        {
            get { return VSSTQH.Properties.Settings.Default.BaudRate2; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.BaudRate2 != value)
                {
                    VSSTQH.Properties.Settings.Default.BaudRate2 = value;
                }
            }
        }
        #endregion
        //--------------------------------------------
        #region Parity
        /// <summary>
        /// Parity = 2
        /// </summary>
        public int Parity
        {
            get { return VSSTQH.Properties.Settings.Default.Parity; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.Parity != value)
                {
                    VSSTQH.Properties.Settings.Default.Parity = value;
                }
            }
        }
        #endregion

        #region Parity 2
        /// <summary>
        /// Parity = 2
        /// </summary>
        public int Parity2
        {
            get { return VSSTQH.Properties.Settings.Default.Parity2; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.Parity2 != value)
                {
                    VSSTQH.Properties.Settings.Default.Parity2 = value;
                }
            }
        }
        #endregion
        //--------------------------------------------
        #region Data Bits
        /// <summary>
        /// DataBits
        /// </summary>
        public int DataBits
        {
            get { return VSSTQH.Properties.Settings.Default.DataBits; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.DataBits != value)
                {
                    VSSTQH.Properties.Settings.Default.DataBits = value;
                }
            }
        }
        #endregion

        #region Data Bits 2
        /// <summary>
        /// DataBits
        /// </summary>
        public int DataBits2
        {
            get { return VSSTQH.Properties.Settings.Default.DataBits2; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.DataBits2 != value)
                {
                    VSSTQH.Properties.Settings.Default.DataBits2 = value;
                }
            }
        }
        #endregion
        //--------------------------------------------
        #region Stop Bits
        /// <summary>
        /// StopBits
        /// </summary>
        public int StopBits
        {
            get { return VSSTQH.Properties.Settings.Default.StopBits; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.StopBits != value)
                {
                    VSSTQH.Properties.Settings.Default.StopBits = value;
                }
            }
        }
        #endregion

        #region Stop Bits 2
        /// <summary>
        /// StopBits
        /// </summary>
        public int StopBits2
        {
            get { return VSSTQH.Properties.Settings.Default.StopBits2; }
            set
            {
                if (VSSTQH.Properties.Settings.Default.StopBits2 != value)
                {
                    VSSTQH.Properties.Settings.Default.StopBits2 = value;
                }
            }
        }
        #endregion
        
        
    }
}
